Fix incompatibility with tree-sitter-javascript >= 0.20.2
authorVincenzo Pupillo <v.pupillo@gmail.com>
Thu, 1 Feb 2024 15:57:39 +0000 (16:57 +0100)
committerEli Zaretskii <eliz@gnu.org>
Sat, 3 Feb 2024 09:14:44 +0000 (11:14 +0200)
commit2f69353e4a756cf53459c14c5618bd262331b568
tree424b5193d12e3e2ef4a01b35e16f044f62f688f7
parentd49124fc14b0bb37617b34b5839f873cea3817c8
Fix incompatibility with tree-sitter-javascript >= 0.20.2

Starting from version 0.20.2 the grammar's primary expression
"function" has been renamed to "function_expression".  A new
function checks if the new primary expression is available,
and if so, it returns the correct rules.
* lisp/progmodes/js.el
(js--treesit-font-lock-compatibility-definition-feature): New
function.
(js--treesit-font-lock-settings): Use it.  (Bug#68879)
lisp/progmodes/js.el